function fn(){
    (function(){
        for(var i=0; i<5; i++){
            console.log(i)
        }
    })();
    console.log("输出：", i)
}

fn()


var obj = (function(){
    let count = 0
    function setter(){
        count ++   
    }
    function getter(){
        return count
    }
    return {
        set : setter,
        get : getter
    }
})()

console.log(obj.count)
console.log(obj.get())
obj.set()
console.log(obj.get())